<?php
/**
 * Created by PhpStorm.
 * User: czm
 * Date: 2019-07-17
 * Time: 16:39
 */
namespace app\index\validate;

use think\Validate;

class Phone extends Validate
{
    protected $rule=[
        // 'phone'                 =>     'require|regex:[1][3,4,5,7,8][0-9]{9}',
        'phone|手机/账号' => 'require|length:11|regex:/^[1][3456789][0-9]{9}$/',
        'password|密码' => 'required|length:6'
    ];
    protected $message=[
        'phone.require'             =>  '手机必须填写',
        'phone.regex'               =>  '联系电话格式不正确',
    ];
}